<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Dashboard - FLATY Admin</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

        <!--base css styles-->
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>assets/bootstrap/bootstrap.min.css">
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>assets/bootstrap/bootstrap-responsive.min.css">
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>assets/font-awesome/css/font-awesome.min.css">
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>assets/normalize/normalize.css">
        
        <!--upload css styles-->
		<link rel="stylesheet" type="text/css" href="<?php echo __TEMPLATE_URL; ?>assets/bootstrap-fileupload/bootstrap-fileupload.css" />        

        <!--page specific css styles-->
        <link rel="stylesheet" href="<?php echo __CSS_URL; ?>paging.css">

        <!--flaty css styles-->
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>css/flaty.css">
        <link rel="stylesheet" href="<?php echo __TEMPLATE_URL; ?>css/flaty-responsive.css">

        <link rel="shortcut icon" href="<?php echo __TEMPLATE_URL; ?>img/favicon.html">
        
        <!--basic scripts-->
        <!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>-->
        <script>window.jQuery || document.write('<script src="<?php echo __TEMPLATE_URL; ?>assets/jquery/jquery-1.10.1.min.js"><\/script>')</script>
        
        <script src="<?php echo __TEMPLATE_URL; ?>assets/modernizr/modernizr-2.6.2.min.js"></script>

        <script src="<?php echo __JS_URL; ?>ckeditor/ckeditor.js"></script>
        
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->

        <!-- BEGIN Theme Setting -->
        <div id="theme-setting">
            <a href="#"><i class="icon-gears icon-2x"></i></a>
            <ul>
                <li>
                    <span>Skin</span>
                    <ul class="colors" data-target="body" data-prefix="skin-">
                        <li class="active"><a class="blue" href="#"></a></li>
                        <li><a class="red" href="#"></a></li>
                        <li><a class="green" href="#"></a></li>
                        <li><a class="orange" href="#"></a></li>
                        <li><a class="yellow" href="#"></a></li>
                        <li><a class="pink" href="#"></a></li>
                        <li><a class="magenta" href="#"></a></li>
                        <li><a class="gray" href="#"></a></li>
                        <li><a class="black" href="#"></a></li>
                    </ul>
                </li>
                <li>
                    <span>Navbar</span>
                    <ul class="colors" data-target="#navbar" data-prefix="navbar-">
                        <li class="active"><a class="blue" href="#"></a></li>
                        <li><a class="red" href="#"></a></li>
                        <li><a class="green" href="#"></a></li>
                        <li><a class="orange" href="#"></a></li>
                        <li><a class="yellow" href="#"></a></li>
                        <li><a class="pink" href="#"></a></li>
                        <li><a class="magenta" href="#"></a></li>
                        <li><a class="gray" href="#"></a></li>
                        <li><a class="black" href="#"></a></li>
                    </ul>
                </li>
                <li>
                    <span>Sidebar</span>
                    <ul class="colors" data-target="#main-container" data-prefix="sidebar-">
                        <li class="active"><a class="blue" href="#"></a></li>
                        <li><a class="red" href="#"></a></li>
                        <li><a class="green" href="#"></a></li>
                        <li><a class="orange" href="#"></a></li>
                        <li><a class="yellow" href="#"></a></li>
                        <li><a class="pink" href="#"></a></li>
                        <li><a class="magenta" href="#"></a></li>
                        <li><a class="gray" href="#"></a></li>
                        <li><a class="black" href="#"></a></li>
                    </ul>
                </li>
                <li>
                    <span></span>
                    <a data-target="navbar" href="#"><i class="icon-check-empty"></i> Fixed Navbar</a>
                    <a class="pull-right visible-desktop" data-target="sidebar" href="#"><i class="icon-check-empty"></i> Fixed Sidebar</a>
                </li>
            </ul>
        </div>
        <!-- END Theme Setting -->

        <!-- BEGIN Navbar -->
        <div id="navbar" class="navbar">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <!-- BEGIN Brand -->
                    <a href="#" class="brand">
                        <small>
                            <i class="icon-desktop"></i>
                            FLATY Admin
                        </small>
                    </a>
                    <!-- END Brand -->

                    <!-- BEGIN Responsive Sidebar Collapse -->
                    <a href="#" class="btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">
                        <i class="icon-reorder"></i>
                    </a>
                    <!-- END Responsive Sidebar Collapse -->

                    <!-- BEGIN Navbar Buttons -->
                    <ul class="nav flaty-nav pull-right">
                    
                        <!-- BEGIN Button User -->
                        <li class="user-profile">
                            <a data-toggle="dropdown" href="#" class="user-menu dropdown-toggle">
                                <img class="nav-user-photo" src="<?php echo __TEMPLATE_URL?>img/demo/avatar/avatar1.jpg" alt="Penny's Photo" />
                                <span class="hidden-phone" id="user_info">
                                    <?php echo h($current_user['display_name']); ?>
                                </span>
                                <i class="icon-caret-down"></i>
                            </a>

                            <!-- BEGIN User Dropdown -->
                            <ul class="dropdown-menu dropdown-navbar" id="user_menu">
                                <li class="nav-header">
                                    <i class="icon-time"></i>
                                    Logined From 20:45
                                </li>

                                <li>
                                    <a href="#">
                                        <i class="icon-cog"></i>
                                        Account Settings
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <i class="icon-user"></i>
                                        Edit Profile
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <i class="icon-question"></i>
                                        Help
                                    </a>
                                </li>

                                <li class="divider visible-phone"></li>

                                <li class="visible-phone">
                                    <a href="#">
                                        <i class="icon-tasks"></i>
                                        Tasks
                                        <span class="badge badge-warning">4</span>
                                    </a>
                                </li>
                                <li class="visible-phone">
                                    <a href="#">
                                        <i class="icon-bell-alt"></i>
                                        Notifications
                                        <span class="badge badge-important">8</span>
                                    </a>
                                </li>
                                <li class="visible-phone">
                                    <a href="#">
                                        <i class="icon-envelope"></i>
                                        Messages
                                        <span class="badge badge-success">5</span>
                                    </a>
                                </li>

                                <li class="divider"></li>

                                <li>
                                    <a href="<?php echo site_url("common/home/logout"); ?>">
                                        <i class="icon-off"></i>
                                        Logout
                                    </a>
                                </li>
                            </ul>
                            <!-- BEGIN User Dropdown -->
                        </li>
                        <!-- END Button User -->
                    </ul>
                    <!-- END Navbar Buttons -->
                    
                    
                    
                </div><!--/.container-fluid-->
            </div><!--/.navbar-inner-->
        </div>
        <!-- END Navbar -->

        <!-- BEGIN Container -->
        <div class="container-fluid" id="main-container">
        
        	<!-- BEGIN Sidebar -->        
				<?php echo Module::run(new Request('home/dashboard/render-left-nav')); ?>
            <!-- END Sidebar -->
            
            
            <!-- BEGIN Content -->
            <div id="main-content">

                <!-- BEGIN Main Content -->
					<?php echo $main_content; ?>
                <!-- END Main Content -->
                
                <!-- BEGIN Delete Modal Content -->
				<div class="modal small hide fade" id="myDeleteConfirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
						<h3 id="myModalLabel">Confirmation</h3>
					</div>
					<div class="modal-body">
						<p class="error-text" id="myQuestion">
							<i class="icon-warning-sign modal-icon"></i> Are you sure you want to delete row ?
						</p>
					</div>
					<div class="modal-footer">
						<a id="modal-form-cancel" class="btn" data-dismiss="modal" aria-hidden="true" href="#">Cancel</a>
						<a id="modal-form-delete" class="btn btn-danger" data-dismiss="modal" href="#">Delete</a>										
					</div>
				</div>
	
				<script type="text/javascript">
					function confimDelete(url, question)
					{
						if(typeof(question)==='undefined') question = "Are you sure you want to delete row ?";
						$('#myDeleteConfirmModal').modal('toggle');
						question = "<i class='icon-warning-sign modal-icon'></i> " + question;
						$('#myQuestion').html(question);
						$('#modal-form-delete').bind('click', function(e){
							
							window.location.href = url;
							
						    // We don't want this to act as a link so cancel the link action
						    //e.preventDefault();
		
						    // Find form and submit it
						    //$('#modal-form').submit();
						  });
						
					}
				</script>
				<!-- END Delete Modal Content -->					
                
                <footer>
                    <p>2013 © FLATY Admin Template.</p>
                </footer>

                <a id="btn-scrollup" class="btn btn-circle btn-large" href="#"><i class="icon-chevron-up"></i></a>
            </div>
            <!-- END Content -->
            
        </div>
        <!-- END Container -->

        <script src="<?php echo __TEMPLATE_URL; ?>assets/bootstrap/bootstrap.min.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/nicescroll/jquery.nicescroll.min.js"></script>
        
        <!--upload javascript -->
		<script src="<?php echo __TEMPLATE_URL; ?>assets/bootstrap-fileupload/bootstrap-fileupload.min.js"></script>

        <!--page specific plugin scripts-->
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.resize.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.pie.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.stack.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.crosshair.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/flot/jquery.flot.tooltip.min.js"></script>
        <script src="<?php echo __TEMPLATE_URL; ?>assets/sparkline/jquery.sparkline.min.js"></script>

        <!--flaty scripts-->
        <script src="<?php echo __TEMPLATE_URL; ?>js/flaty.js"></script>

    </body>
</html>
